﻿using UnityEngine;

namespace SillyCube.Behavior
{
    public struct CubeBehaviorForceEventInfo
    {
        public Vector2 rawForce;
    }

    public struct CubeBehaviorCameraMoveInfo
    {
        public Transform cameraTransform;
    }
    
    public abstract class CubeBehaviorBase : MonoBehaviour
    {
        public virtual bool AllowDragForce()
        {
            return true;
        }
        
        public virtual void OnForceBegin(CubeBehaviorForceEventInfo info) { }
        public virtual void OnForceEnd(CubeBehaviorForceEventInfo info) { }
        public virtual void OnForceApply(CubeBehaviorForceEventInfo info) { }

        public virtual bool OnCameraMove(CubeBehaviorCameraMoveInfo info)
        {
            return true;
        }

        public virtual float GetMaxForceMagnitude()
        {
            return 2.5f;
        }
    }
}